<?php
/*------------------------------------------
* @AUTHOR: TANDAT @EMAIL:tidusvn05@gmail.com
* @PHONE: +84933731173
* -----------------------------------------*/
class D_Controller extends Zend_Controller_Action{
	protected $objSQL=null;
	protected $objSe=null;
	protected $module=null;
	protected $config=null;
	protected $cache=null;
	
	function parentInit(){
				
	}
	
	protected function setView($file='index/index.phtml'){
        $this->_helper->viewRenderer->setViewScriptPathSpec($file);
	}
	
	public function noRender(){$this->_helper->viewRenderer->setNoRender(true);}
	public function noLayout(){$this->_helper->layout()->disableLayout();}
	public function noView(){$this->noRender();$this->noLayout();}
	public function setLayout($layout,$dir=""){//$this->_layout = $this->_helper->layout()->getView();
       // $this->_layout->addScriptPath('./application/modules/default/views/layouts');
      	if($dir!="") $layout=$dir."/".$layout;
		$this->_helper->layout->setLayout("".$layout);
	}
	
		
	public function appendJS($filename,$folder="js"){
		$this->view->headScript()->appendFile(ROOT_URL."public/{$folder}/{$filename}.js");
	}
	
	public function appendCSS($filename,$folder="css"){
		$this->view->headLink()->appendStylesheet(ROOT_URL. "/public/{$folder}/{$filename}.css");
	}
		
	
} 